#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtGui>
#include <QLabel>
#include "eproject.h"
#include "programsettings.h"
namespace Ui
{
    class MainWindowClass;
}

class EEditor;
class ProjectContextMenu;

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();

private:
    Ui::MainWindowClass *ui;
    EProject pro;
    EEditor *currEditor;
    ProjectContextMenu *menu;
    ProgramSettings *proSettings;
    QString m_searchString;
    enum { MaxRecentFiles = 10 };
    QPushButton *recentProjectBttns[MaxRecentFiles];
    QAction *recentFileActs[MaxRecentFiles];
    void initSettings();
    void recentProjectsInit();
private slots:
    void on_openedFilesTabWidget_tabCloseRequested(int index);
    void openRecentProject();
    void editorTabPositionChange(int);
    void on_action_Settings_program_triggered(bool checked);
    void on_action_Open_project_triggered(QString = QString());
    void on_actionUnindent_triggered();
    void on_actionIndent_triggered();
    void on_openedFilesTabWidget_customContextMenuRequested(QPoint pos);
    void on_actionClose_tab_triggered();
    void on_searchEngines_currentIndexChanged(int index);
    void newSearch();
    void searchStringChanged(QString);
    void projectFilesContext(const QPoint &);
    void on_action_Save_as_triggered();
    void on_action_Save_triggered();
    void closeCurrentTab();
    void setCurrentTab(int index);
    void documentModified();
    void on_projectFiles_doubleClicked(QModelIndex index);
    void on_action_Open_file_triggered(QString = QString());
    void on_action_Delete_triggered();
    void on_action_Paste_triggered();
    void on_action_Copy_triggered();
    void on_action_Select_all_triggered();
    void on_action_Cut_triggered();
    void on_action_Redo_triggered();
    void on_action_Undo_triggered();
    void on_action_New_file_triggered();
};

#endif // MAINWINDOW_H
